import {HttpUtil} from "../utils/HttpUtil";
import {CookieUtil} from "../utils/CookieUtil";
import {Base64} from 'js-base64';


export const uploadAction = (param) => {

    const url = "/upload";

    return new Promise(function (resolve,reject) {
        HttpUtil.upload(url,param).then(function (txt) {
            const res = JSON.parse(txt);
            resolve(res);
        }).catch(function (err) {
            reject(err);
        });
    })

};